//********************************************************
// Board.java 
// Date: 4/4/2012
// Author: Jeff xiong
//********************************************************
// Class to hold game data and determine if game is over
//*******************************************************
// EDITED by Andrew:
//*******************************************************
package functionality;

import java.util.ArrayList;

import javax.swing.JButton;
import javax.swing.JComboBox;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JTextArea;
import javax.swing.JTextField;
import javax.swing.WindowConstants;

import ui.Board;
import ui.GetNumPlayers;
import ui.MakePlayers;
import ui.Tile;

public class RobberKnights {
	private static int _size=0;
	private static MakePlayers Players;
	public static Player currentPlayer;	
	private boolean allDone=false;
	
	
	/**
	 * Starts game by gettting number of players
	 * 
	 * @param none
	 * @return none
	 */
	public void StartCurrentGame()
	{
		GetNumPlayers p =new GetNumPlayers();			
		p.startGame();		
		_size=p.getSize();
	}
	
	/**
	 * Makes current players
	 * 
	 * @param none
	 * @return none
	 */
	public void MakeCurrentPlayers()
	{
		Players=new MakePlayers(_size);
	}
	
	/**
	 * Gets size
	 * 
	 * @param none
	 * @return int size - size of the board represented by a single dimension as both dimensions are the same
	 */
	public int getSize()
	{
		return _size;
	}
	
	/**
	 * returns players current hand
	 * 
	 * @param player number in the array
	 * @return arraylist of Tile
	 */
	public static ArrayList<Tile> getCurrentHandUI(int j)
	{
		return Players.getCurrentHandUI(j);
	}
	
	/**
	 * returns player
	 * 
	 * @param player number in the array
	 * @return Player object
	 */
	public Player getPlayer(int j)
	{
		return Players.getCurrentPlayer(j);
	}
	
	/**
	 * gets current player
	 * 
	 * @param 
	 * @return 
	 * @return Player object
	 */
	public Player getCurrentPlayer()
	{
		return currentPlayer;
	}
	
	/**
	 * sets current player
	 * 
	 * @param player
	 * @return Player object
	 */
	public void setCurrentPlayer(int j)
	{
		currentPlayer=getPlayer(j);
	}

	
	/**
	 * gets if game is done
	 * 
	 * @param 
	 * @return boolean	
	 */
	public boolean isAllDone() {
		
		return allDone;
	}
	/**
	 * set game done
	 * 
	 * @param boolean	
	 */
	public void setAllDone(boolean t)
	{
		allDone=t;
	}
	
	
	
	
}